import 'package:boss/textStyle/text_style.dart';
import 'package:boss/ui/page/reportForm/order/page/orderDetail/provider/order_detail_provider.dart';

import 'package:hi_common/hi_common.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';

class OrderDetailHeader extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container(
      height: 97.w,
      child: Consumer<OrderDetailProvider>(
        builder: (context, orderDetailProvider, _) {
          return Row(
            mainAxisAlignment: MainAxisAlignment.spaceBetween,
            children: <Widget>[
              Text('订单号：${orderDetailProvider.unionOrderId}', style: TextStyleConstant().normal_1_28,),
              RichText(
                text: TextSpan(
                    text: '下单人：',
                    style: TextStyleConstant().normal_3_28,
                    children: [
                      TextSpan(
                        text: '${orderDetailProvider.data.orderProp.orderPersionName==''?'--':orderDetailProvider.data.orderProp.orderPersionName ?? '--'}',
                        style: TextStyleConstant().normal_1_28,
                      ),
                    ]
                ),
              ),
            ],
          );
        },
      ),
    );
  }
}
